/*

 *
 */

package com.ruifu.common.feign.fallback;

import com.fhzncloud.cloud.common.core.util.PageR;
import com.ruifu.common.feign.RemoteActService;
import com.ruifu.common.vo.actanddoc.ActivitiVO;
import com.ruifu.common.vo.actanddoc.Flag;
import com.ruifu.common.vo.actanddoc.ProccessTaskVO;
import com.ruifu.common.vo.actanddoc.ProcessParams;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author liun
 * @date 2020/5/6
 */
@Slf4j
@Component
public class RemoteActServiceFallbackImpl implements RemoteActService {
	@Setter
	private Throwable cause;

	/**
	 * 提交启动流程
	 *
	 * @param processParams
	 * @return
	 */
	@Override
	public Flag submitDocument(ProcessParams processParams) {
		log.error("feign submitDocument失败:{}", processParams, cause);
		return null;
	}

	/**
	 * 待处理
	 *
	 * @param page
	 * @param size
	 * @return
	 */
	@Override
	public PageR<List<ActivitiVO>> iReview(Integer page, Integer size) {
		log.error("feign iReview失败:", cause);
		return null;
	}

	/**
	 * 已处理
	 *
	 * @param page
	 * @param size
	 * @return
	 */
	@Override
	public PageR<List<ActivitiVO>> queryDoneTasks(Integer page, Integer size) {
		log.error("feign queryDoneTasks失败:", cause);
		return null;
	}

	/**
	 * 通过/驳回/重新提交
	 *
	 * @param processParams
	 * @return
	 */
	@Override
	public Flag flag(ProcessParams processParams) {
		log.error("feign flag失败:", cause);
		return null;
	}

	/**
	 * 获取节点信息计算流程权限
	 *
	 * @param businessKey
	 * @return
	 */
	@Override
	public ProccessTaskVO getNowTaskNode(String businessKey) {
		log.error("feign getNowTaskNode失败:{}", businessKey, cause);
		return null;
	}

	/**
	 * 从默认账套的模板数据中拷贝模板信息到新的账套(内部方法)
	 *
	 * @param sourceTenantId
	 * @param targetTenantId
	 * @param from
	 * @return
	 */
	@Override
	public Boolean TenantTemplateCopy(Integer sourceTenantId, Integer targetTenantId, String from) {
		return null;
	}


}
